package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

@Schema(description="入库明细表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_storage_order_detail")
public class WarehouseStorageOrderDetail extends BaseEntity<WarehouseStorageOrderDetail> {

    @TableField(value = "warehouse_storage_order_id")
    @Schema(description="入库作业id")
    private Long warehouseStorageOrderId;

    @TableField(value = "product_unit_id")
    @Schema(description="单位id")
    private Long productUnitId;

    @TableField(value = "net_weight")
    @Schema(description="净重")
    private Double netWeight;

    @TableField(value = "gross_weight")
    @Schema(description="毛重")
    private Double grossWeight;

    @TableField(value = "price")
    @Schema(description="单价")
    private BigDecimal price;

    @TableField(value = "user_bundle_code")
    @Schema(description="捆包号")
    @NotBlank(message = "捆包号不能为空")
    private String userBundleCode;

    @TableField(value = "sys_bundle_code")
    @Schema(description="条码")
    private String sysBundleCode;
}
